/**
 * Created by Administrator on 2017/1/21.
 */

var MJ = require('../MJ/MJ');
//拉庄状态
exports.LaZhuangStatus = {
    'NONE': 0,
    'FINISHED': 1,
}
var ScoreRule = clone(MJ.ScoreRule);
ScoreRule.QingYiSe =  201;      // 清一色
ScoreRule.YTL =  202;            // 一条龙
ScoreRule.HHPair7 =  203;        // 豪华七对
ScoreRule.MenHu =  204;         //闷胡
ScoreRule.SuHu =  205;          //素胡
ScoreRule.ZWK =  206;           //捉五魁
ScoreRule.HunDai =  207;      //混调
ScoreRule.HDH =  208;          //混调混
ScoreRule.HunYou =  209;       //混悠
ScoreRule.KouTing =  210;      //扣听
ScoreRule.JMG =  211;           //金明杠
ScoreRule.JAG =  212;           //金暗杠
ScoreRule.NORMAL =  213;           //平胡



var Pattern = {
    'NONE': 0,                       // 不是可胡的牌型 0
    'NORMAL': MJ.Pattern.NORMAL,  // 平胡自摸       1
    'PAIR': 2,                      //碰碰胡           2
    'PAIR7': MJ.Pattern.PAIR7,    // 七对            3

    'HUNGANG': 5,                     //4个宝直接胡牌    5
};

var PatternScore = {};
PatternScore[Pattern.NORMAL] = 1;
PatternScore[Pattern.PAIR] = 1;
PatternScore[Pattern.PAIR7] = 1;
PatternScore[Pattern.HUNGANG] = 10;

var ItemScore = {};
ItemScore[ScoreRule.DH] = 0;
ItemScore[ScoreRule.ZM] = 1;
ItemScore[ScoreRule.LZ] = 0;
ItemScore[ScoreRule.GSH] = 1;           //杠呲
ItemScore[ScoreRule.GSP] = 0;
ItemScore[ScoreRule.QG] = 0;
ItemScore[ScoreRule.BT] = 0;
ItemScore[ScoreRule.TH] = 10;
ItemScore[ScoreRule.DIHU] = 10;
ItemScore[ScoreRule.TT] = 0;

ItemScore[ScoreRule.QingYiSe] = 1;
ItemScore[ScoreRule.YTL] = 1;
ItemScore[ScoreRule.HHPair7] = 1;
ItemScore[ScoreRule.MenHu] = 1;
ItemScore[ScoreRule.SuHu] = 1;
ItemScore[ScoreRule.ZWK] = 1;
ItemScore[ScoreRule.HunDai] = 1;
ItemScore[ScoreRule.HDH] = 1;
ItemScore[ScoreRule.HunYou] = 1;
ItemScore[ScoreRule.KouTing] = 1;
ItemScore[ScoreRule.JMG] = 1;
ItemScore[ScoreRule.JAG] = 2;



var ScoreReason = {
    DH: MJ.Result.DH,  // 点胡/点炮
    ZM: MJ.Result.ZM,  // 自摸/被自摸
    //PIAO: 301,          // 飘
    //SIBAO:11,
    BT: ScoreRule.BT, // 报听
    LZ: ScoreRule.LZ, // 庄家
    QG: ScoreRule.QG, // 抢杠
};


var GangScore = {};
GangScore[MJ.Gang.BA] = 1;
GangScore[MJ.Gang.AN] = 2;
GangScore[MJ.Gang.DIAN] = 1;
GangScore[MJ.Gang.ANS] = 2;

exports.ScoreRule = ScoreRule;
exports.Pattern = Pattern;
exports.PatternScore = PatternScore;
exports.ItemScore = ItemScore;
exports.ScoreReason = ScoreReason;
exports.GangScore = GangScore;


//exports.SpecGang = SpecGang;
//exports.SpecGangScore = SpecGangScore;